//
//  RUHUD.swift
//  Neufood
//
//  Created by Mac  on 2017/9/26.
//  Copyright © 2017年 Mac . All rights reserved.
//

import Foundation

extension MBProgressHUD{
    class  func showTextDialog(_ view:UIView,message:String)
    {
        let HUD = MBProgressHUD(view: view)
        view.addSubview(HUD!)
        HUD?.customView = UIImageView(frame: CGRect.zero)
        HUD?.mode = MBProgressHUDMode.customView
        HUD?.labelText = message
        HUD?.yOffset = Float(view.frame.height*1.0/4.0)
        HUD?.show(true)
        //延时隐藏
        HUD?.hide(true, afterDelay: 1)
        
    }
}
